<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="../js/angular.js"></script>
		<script src="../js/personController.js"></script>
	</head>

	<body ng-app="myApp">
		<p>ng-controller 指令定义了应用程序控制器。控制器是 JavaScript 对象，由标准的 JavaScript 对象的构造函数 创建</p>
		<div ng-controller="personCtrl">
			名: <input type="text" ng-model="firstName"><br> 
			姓: <input type="text" ng-model="lastName"><br>
			<br> 
			<p>过滤器：过滤器可以使用一个管道字符（|）添加到表达式和指令中。</p>
			姓名: {{firstName + " " + lastName | uppercase}}
		</div>
		<div ng-controller="namesCtrl">
			<ul>
			  <li ng-repeat="x in names | orderBy:'country'">
			    {{ x.name + ', ' + x.country }}
			  </li>
			</ul>
		</div>
		<p>自定义过滤器</p>
		<div ng-controller="myCtrl">
			姓名: {{ msg | reverse }}
		</div>
	</body>
	
</html>